<style>
</style>
<div th:fragment="main-banner">
    <div class="cs-banner container">
        <div class="flexslider">
            <ul class="slides">
            </ul>
        </div>
    </div>
    <script>
        $(function () {
            $.ajax({
                type: "POST",
                url: "/web/common/getBanner",
                data: "name=John",
                success: function(msg){
                    var htmlStr = "";
                    for (var i = 0;i<msg.data.length;i++){
                        htmlStr += '                <li>\n' +
                            '                    <figure>\n' +
                            '                        <img src="/'+msg.data[i].banner+'" width="1500px" height="300px" alt="#">\n' +
                            '                        <figcaption>\n' +
                            '                            <a href="/web/project_info?projectId='+msg.data[i].projectId+'" class="explore-btn"> 去看看</a>\n' +
                            '                        </figcaption>\n' +
                            '                    </figure>\n' +
                            '                </li>';
                    }
                    $('.slides').html(htmlStr);

                }
            });
        })

    </script>
</div>

